<?php

namespace App\HttpController\Oa;


use App\HttpController\ControllerAdmin;

class Logout extends ControllerAdmin
{
    //退出登陆
    public function index()
    {
        $app_user = $this->funcGetOAUser();

        //删除redis
        $this->redis()->del($app_user->redis_key);

        $this->funcWriteCommonR();
    }


    public function onRequest(?string $action): ?bool
    {
        $this->response()->withHeader('Access-Control-Allow-Origin', '*');

        return true;
    }
}